// MyDlg.cpp : implementation file
//

#include "stdafx.h"
#include "TestMFC.h"
#include "MyDlg.h"


// MyDlg dialog

IMPLEMENT_DYNAMIC(MyDlg, CDialog)

MyDlg::MyDlg(CWnd* pParent /*=NULL*/)
	: CDialog(MyDlg::IDD, pParent)
{

}

MyDlg::~MyDlg()
{
}

void MyDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
}


BEGIN_MESSAGE_MAP(MyDlg, CDialog)
	ON_BN_CLICKED(IDC_BUTTON1, &MyDlg::OnBnClickedButton1)
END_MESSAGE_MAP()


// MyDlg message handlers

void MyDlg::OnBnClickedButton1()
{
	// TODO: Add your control notification handler code here
	CWnd * pWnd = (CWnd *)GetDlgItem(IDC_EDIT1);
	CDC * pdc = pWnd->GetDC();
	BOOL s = pdc->Ellipse(0,0,20,20);
	if (!s) {
		MessageBox(_T("erro"));
	} 
}
